/**
 * Created by Kylin on 2016/12/6.
 */
export const ADD_TODO = 'ADD_TODO';
export const COMPLETED_TODO = 'COMPLETED_TODO';
export const SET_VISIBILITY_FILTER = 'SET_VISIBILITY_FILTER';
export const SHOW = 'SHOW';

export const VisibilityFilters = {
    SHOW_ALL: 'SHOW_ALL',
    SHOW_COMPLETED: 'SHOW_COMPLETED',
    SHOW_ACTIVE: 'SHOW_ACTIVE'
};

// 添加事件动作
export function addTodo(text) {
    return {type: ADD_TODO, text}
}

export function completedTodo(index) {
    return {type: COMPLETED_TODO, index}
}

export function setVisibilityFilter(filter) {
    return {type: SET_VISIBILITY_FILTER, filter}
}
//展示
export function show(text) {
    return {type: SHOW, text}
}